package com.atguigu.carousel.controller;

import com.atguigu.carousel.service.CarouselService;
<<<<<<< HEAD
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
=======
import com.atguigu.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
>>>>>>> 6a60feb746291cdad2d7e97b2fe9933c5c00923d
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

<<<<<<< HEAD

@RestController
@RequestMapping("carousel")
public class CarouselController  {
=======
/**
 * projectName: b2c-store
 * <p>
 * description: 轮播图的控制类
 */
@RestController
@RequestMapping("carousel")
public class CarouselController {
>>>>>>> 6a60feb746291cdad2d7e97b2fe9933c5c00923d

    @Autowired
    private CarouselService carouselService;

    /**
<<<<<<< HEAD
     * 查询首页数据,查询优先级最高的四条
     * @return
     */
    @PostMapping("list")
    public Object list(){

        return  carouselService.list();
=======
     * 查询轮播图数据,只要优先级最高的6条!
     * @return
     */
    @PostMapping("list")
    public R list(){

        return carouselService.list();
>>>>>>> 6a60feb746291cdad2d7e97b2fe9933c5c00923d
    }

}
